#!/bin/sh
# -*- shell-script -*-
# Copyright (C) 2020 GraphicsMagick Group
# Test many 'convert' command-lines
. ./common.shi
. ${top_srcdir}/utilities/tests/common.sh

commands=${top_srcdir}/utilities/tests/convert-cmds.txt

# Count how many commands there are
count=`sed -n '$=' ${commands}`

# Number of tests we plan to execute
test_plan_fn ${count}

cat ${commands} | sed -e "s;\${SUNRISE_MIFF};${SUNRISE_MIFF};g" | while read subcommand
do
    #set -x
    # identity:10 produces a 1000x1000 image
    # Removed -segment 0.5x0.25 since it can not work with such images
    eval test_command_fn "\"${subcommand}\"" ${GM} convert identity:10 -comment \"${subcommand}\" ${subcommand}  -format \"%r %g %# %c\" info:-
    #set +x
done
